*******************************
Compiling mdNamePHPWrapper.cpp
*******************************

You may need to recompile mdNameNameWrapper.cpp if you are not using a version of PHP that is compatible with
the php_mdNamePHPWrapper.dll that is supplied. 

Prerequisites:
	
	Visual C++ Compiler
	PHP Binary installed (tested with PHP 5.2.6)
	PHP Source Code (tested with PHP 5.2.6)


To compile mdNamePHPWrapper.cpp, a bat file has been supplied. This bat file requires the Visual Studio C++ 
compiler. To use the compiler, you must set up its environment by executing vcvars32.bat in the Visual Studio
C++ bin folder. Read the comments at the top of CreateDll.bat for more details.

You must then set the path to the PHP Include and Library path. You also need to set the path of the Name Object
library (mdName.dll). The default locations of these files have been set already but may require changes if your
system is different.

set mdNamePath to location of mdName.dll
set PHPIncludePath1 to location of PHP Source Zend Directory
set PHPIncludePath2 to location of PHP Source Win32Directory
set PHPIncludePath3 to location of PHP Source TSRMDirectory
set PHPIncludePath4 to location of PHP Source Main Directory
set PHPIncludePath5 to location of PHP Source Directory
set PHPLibraryPath to location of PHP Binary Dev Directory (contains php5ts.lib)

You will also need to change the PHP dependency that the code needs based on your version of PHP. In CreateDll.bat, 
you will need to change the following to match your installation of PHP:

	-DEFAULTLIB:php5ts.lib

phpXts.lib should be in your PHP\dev directory. For example, if you are using PHP 4 , you will change to:

	-DEFAULTLIB:php4ts.lib


Now, you can run CreateDll.bat to create php_mdNamePHPWrapper.dll.




*****
Note: 
*****

If when running CreateDll.bat, you get a series or errors containing "cannot allocate an array of constant size 0," 
you are likely trying to compile with Visual C++ 8 (Visual Studio 2005). There appears to be a bug in the PHP source 
code relating to Visual Studio 2005 that is not present in Visual Studio 2003. Please try compiling with Visual C++ 7 
or earlier. Or, you can go into php/main/config.w32.h and comment out these two lines:

#define _USE_32BIT_TIME_T 1
#define HAVE_STDLIB_H 1
